class Complex <T extends Number> {
    T x;
    T y;
    public Complex(T x, T y) {
        this.x = x;
        this.y = y;
    }

    public String getString() {
        return "[ "+x+" + "+y+"i ]";
    }
}
public class Test_1 {
    public static void main(String[] args) {
        Complex<Integer> c1 = new Complex<>(1,2);
        System.out.println(c1.getString());
        Complex<Double> c2 = new Complex<>(1.1,2.2);
        System.out.println(c2.getString());
        Complex<Float> c3 = new Complex<>(1.11f,2.22f);
        System.out.println(c3.getString());
    }
}
